package cn.iocoder.yudao.module.pplan.dal.mysql.serviceequipment;

import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.pplan.controller.admin.serviceequipment.vo.ServiceEquipmentPageReqVO;
import cn.iocoder.yudao.module.pplan.dal.dataobject.serviceequipment.ServiceEquipmentDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 生产计划-服务用具管理 Mapper
 *
 * @author yisl
 */
@Mapper
public interface ServiceEquipmentMapper extends BaseMapperX<ServiceEquipmentDO> {

    default PageResult<ServiceEquipmentDO> selectPage(ServiceEquipmentPageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<ServiceEquipmentDO>()
                .likeIfPresent(ServiceEquipmentDO::getFlightNo, reqVO.getFlightNo())
                .orderByDesc(ServiceEquipmentDO::getId));
    }

}